import React from "react";
import { SearchBox } from "./Search.style";


const Search = (props) => {
  const { handleOnclick, goToMap }= props;
  return (
    <SearchBox>
      <svg className="icon" aria-hidden="true" onClick={() =>goToMap()}>
        <use xlinkHref="#icon-dingwei"></use>
      </svg>
      <div className="search_location" onClick={() =>goToMap()}>南昌</div>
      <input placeholder="西西里的美丽传说" />
      <svg className="icon" aria-hidden="true" onClick={()=>{handleOnclick()}}>
        <use xlinkHref="#icon-jiahao"></use>
      </svg>
    </SearchBox>
  );
};

export default Search;
